home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / prog / mulat387.zip / 387ENGL.DOC < prev    next >
Text File  |  1990-04-29  |  20KB  |  414 lines

  1.                   ╔════════════════════════════════╗
  2.                   ║                                ║
  3.                   ║            FRANKE.387          ║
  4.                   ║                                ║
  5.                   ║    Coprocessor Emulation for   ║
  6.                   ║         387DX and 387SX        ║
  7.                   ║                                ║
  8.                   ║           Version 2.4          ║
  9.                   ║                                ║
  10.                   ║  (c) Copyright 1989, 1990 by   ║
  11.                   ║      Ingenieurbüro FRANKE,     ║
  12.                   ║      All rights reserved.      ║
  13.                   ║                                ║
  14.                   ╚════════════════════════════════╝
  15.  
  16. Overview
  17. ════════
  18.  
  19. FRANKE.387 is a software emulation of the arithmetic coprocessors 387DX
  20. and 387SX from Intel. FRANKE.387 was developed for ATs using a 386DX or
  21. 386SX processor. MS-DOS or any compatible operation system is required.
  22.  
  23. The hole instruction set of the 387 coprocessor is available with
  24. FRANKE.387. All 16 or 32 bit addressing modes are supported. No
  25. application program can make out any difference to the real coprocessor.
  26.  
  27. Of course, FRANKE.387 is not able to increase the physical power of your
  28. computer. FRANKE.387 is slower than a 387 coprocessor, but you can run
  29. every application having no expensive coprocessor. Many application
  30. programs will run up to 2.25 times faster even with FRANKE.387 if they
  31. support a coprocessor.
  32.  
  33.  
  34. Shareware
  35. ═════════
  36.  
  37. Starting with version 2.4, FRANKE.387 will also be distributed as
  38. shareware. The shareware version does not have all features, the full
  39. version has.
  40.  
  41. The not registered shareware version may freely be copied and distributed
  42. for free. Everybody may test the not registered version free of charge
  43. for up to 30 days.
  44.  
  45. All rights, not described above, like selling, changing, distribution of
  46. a registered version or even the use of the not registered version
  47. longer than 30 days are explicitly not permitted, if you do not have a
  48. prior written permission from Ingenieurbüro Franke.
  49.  
  50.  
  51. Registration
  52. ════════════
  53.  
  54. Only registered users may use FRANKE.387 longer than 30 days. The
  55. registered versions do not need any interactions during boot.
  56.  
  57.    ┌───────────────────────────────────────────────────────┬──────────────┐
  58.    │ Version                                               │ Fee          │
  59.    │                                                       │ incl. costs  │
  60.    ├───────────────────────────────────────────────────────┼──────────────┤
  61.    │ Shareware version, only one precision level           │ DM  64.00    │
  62.    │                                                       │              │
  63.    │ Full version, 3 precision levels, High Level Language │              │
  64.    │ Interface, 387 Instruction Trace Modus                │ DM  99.00    │
  65.    │                                                       │              │
  66.    │ Upgrade from shareware version to full version        │ DM  44.00    │
  67.    └───────────────────────────────────────────────────────┴──────────────┘
  68.  
  69. We need the following data for your registration:
  70.  
  71.         1. name
  72.         2. complete address
  73.         3. requested version (shareware/full/upgrade)
  74.  
  75. Send your registration including the fee to:
  76.  
  77.       ┌─────────────────────────────────────────────────────────────┐
  78.       │   Letter/Fax/Check:               Payment:                  │
  79.       │                                                             │
  80.       │   Ingenieurbüro FRANKE            Ingenieurbüro FRANKE      │
  81.       │   Rennweg 61                      Konto 10039999            │
  82.       │   D-8500 Nürnberg 20, Germany     Schmidt Bank, Nürnberg    │
  83.       │   Fax: 49 911 535421              BLZ 760 300 70            │
  84.       └─────────────────────────────────────────────────────────────┘
  85.  
  86. We will deliver your registered version after we received your payment.
  87.  
  88.  
  89. Installation
  90. ════════════
  91.  
  92. The installation of FRANKE.387 is very easy:
  93.  
  94. 1. Copy the files FRANKE.387 and 387.EXE to your hard disk or boot
  95.    floppy.
  96.  
  97. 2. Create the CONFIG.SYS file, if it does not exist.
  98.  
  99. 3. Insert the following line in CONFIG.SYS file:
  100.  
  101.         DEVICE = FRANKE.387
  102.  
  103.    If needed you can include a path description before FRANKE.387,
  104.    e.g. DEVICE = c:\tools\FRANKE.387
  105.  
  106.    After the name FRANKE.387 you can use the swiches ON or OFF.
  107.    E.g. DEVICE = FRANKE.387 ON.
  108.    This swiches specify whether FRANKE.387 will be enable or disabled
  109.    during boot. If swiches are missing, FRANKE.387 will be automatically
  110.    enabled, if no coprocessor was found, and disabled otherwise.
  111.  
  112. 4. Re-boot the computer.
  113.  
  114.    The entry in the CONFIG.SYS file loads FRANKE.387 every time you
  115.    boot. FRANKE.387 comes up with a copyright message and its current
  116.    status.
  117.  
  118.    ┌────────────────────────────────────────────────────────────────────┐
  119.    │ The not registered shareware version uses an extended copyright    │
  120.    │ message and sounds two bell signals. To continue boot you must     │
  121.    │ press the key specified in the last line of the screen. - Only     │
  122.    │ uppercase letters are accepted!                                    │
  123.    └────────────────────────────────────────────────────────────────────┘
  124.  
  125.  
  126.  
  127. How to use FRANKE.387
  128. ═════════════════════
  129.  
  130. Normally FRANKE.387 needs no user interaction. All actions are started
  131. from the application programs that utilize the coprocessor. So FRANKE.387
  132. does its work automatically. The application programs cannot make out
  133. any difference to the real coprocessor.
  134.  
  135. Of course, FRANKE.387 must be enabled to work. As described, FRANKE.387
  136. can be enabled or disabled using the swiches ON or OFF at installation.
  137. Normally FRANKE.387 is always enabled, if no coprocessor is installed.
  138.  
  139. To enable or disable FRANKE.387 after installation, you can use the program
  140. 387.EXE. This program may be copied to any directory of your hard disk
  141. or to any floppy disk.
  142.  
  143. 387.EXE allows the following calling options. Some of this options are
  144. supported by the full version only.
  145.  
  146. ┌─────────────────┬───────────────────────────────────────────────────────┐
  147. │ Option          │ Functions performed                                   │
  148. ├─────────────────┼───────────────────────────────────────────────────────┤
  149. │ 387             │ FRANKE.387 will be set to default status.             │
  150. │                 │ I.e. FRANKE.387 will be enabled if no coprocessor is  │
  151. │                 │ installed. It will be disabled if a coprocessor was   │
  152. │                 │ found.                                                │
  153. ├─────────────────┼───────────────────────────────────────────────────────┤
  154. │ 387 ON          │ FRANKE.387 is enabled with full precision.            │
  155. ├─────────────────┼───────────────────────────────────────────────────────┤
  156. │ 387 OFF         │ FRANKE.387 is disabled. This may be necessary, if     │
  157. │                 │ you want to re-boot your system with Ctrl+Alt+Del.    │
  158. │                 │ The keyboard driver KEYBOARD.386 will do that auto-   │
  159. │                 │ matically.                                            │
  160. ╞═════════════════╧═══════════════════════════════════════════════════════╡
  161. │ The following opitons are supported by the full version only.           │
  162. ╞═════════════════╤═══════════════════════════════════════════════════════╡
  163. │ 387 53          │ FRANKE.387 is enabled with 53 bit precision maximum.  │
  164. │                 │ This corresponds to the data types 'double', 'long    │
  165. │                 │ real' or 'double precision'. Most of the application  │
  166. │                 │ programs do not need more precision. FRANKE.387 will  │
  167. │                 │ run faster using this option.                         │
  168. ├─────────────────┼───────────────────────────────────────────────────────┤
  169. │ 387 24          │ FRANKE.387 is enabled with 24 bit precision maximum.  │
  170. │                 │ This corresponds to the data types 'float', 'real' or │
  171. │                 │ 'single precision'. In most cases, no higher pre-     │
  172. │                 │ cision is needed. FRANKE.387 will run much faster     │
  173. │                 │ using this option.                                    │
  174. ├─────────────────┼───────────────────────────────────────────────────────┤
  175. │ 387 ON I        │ Same as 387 ON, the High Level Language Interface     │
  176. │                 │ is enabled. (See also High Level Language Interface.) │
  177. ├─────────────────┼───────────────────────────────────────────────────────┤
  178. │ 387 53 I        │ Same as 387 53, the High Level Language Interface     │
  179. │                 │ is enabled. This is the suggested standard option for │
  180. │                 │ the full version. (See also High Level Language       │
  181. │                 │ Interface.)                                           │
  182. ├─────────────────┼───────────────────────────────────────────────────────┤
  183. │ 387 24 I        │ Same as 387 24, the High Level Language Interface     │
  184. │                 │ is enabled. FRANKE.387 run at maximum speed, if you   │
  185. │                 │ use this option. (See also High Level Language        │
  186. │                 │ Interface.)                                           │
  187. └─────────────────┴───────────────────────────────────────────────────────┘
  188.  
  189.  
  190.  
  191. Speed
  192. ═════
  193.  
  194. Like any 387 coprocessor, FRANKE.387 supports the three precision levels
  195. for 64, 53 and 24 bit precision. The full version allows the user to
  196. specify the maximum precision to increase computing speed.
  197.  
  198. The following table shows the aprox. number of CPU cyles. The numbers
  199. are for a 386DX processor and no wait states. In the case of a 386SX or
  200. wait states all numbers should be increased a little bit.
  201.  
  202. The column EMUL87 shows the speed for the public domain 80287 emulation.
  203.  
  204. ┌──────────╥──────────────────╥───────╥──────────────────────────╥────────┐
  205. │          ║                  ║       ║        FRANKE.387        ║        │
  206. │ Instruct.║ Description      ║ 387DX ║ 64 Bit │ 53 Bit │ 24 Bit ║ EMUL87 │
  207. ╞══════════╬══════════════════╬═══════╬════════╪════════╪════════╬════════╡
  208. │ FNOP     ║ no operation     ║    25 ║    410 │    410 │    410 ║  1,075 │
  209. │ FLD      ║ load TByte number║    38 ║    650 │    650 │    650 ║  1,470 │
  210. │ FSTP     ║ store TByte num. ║    55 ║    745 │    745 │    745 ║  1,495 │
  211. ├──────────╫──────────────────╫───────╫────────┼────────┼────────╫────────┤
  212. │ FADD     ║ Addition         ║    34 ║    700 │    700 │    680 ║  1,460 │
  213. │ FSUB     ║ Subtraction      ║    34 ║    770 │    770 │    750 ║  1,565 │
  214. │ FMUL     ║ Multiplication   ║    52 ║    830 │    800 │    700 ║  1,985 │
  215. │ FDIV     ║ Division         ║    96 ║    840 │    840 │    710 ║  2,340 │
  216. ├──────────╫──────────────────╫───────╫────────┼────────┼────────╫────────┤
  217. │ FSQRT    ║ Square Root      ║   126 ║  1,295 │  1,060 │    805 ║  3,135 │
  218. │ FSIN     ║ Sinus            ║   490 ║  3,960 │  3,770 │  1,960 ║   ---  │
  219. │ FCOS     ║ Cosinus          ║   547 ║  4,100 │  3,910 │  2,070 ║   ---  │
  220. │ FPTAN    ║ Tangens          ║   342 ║  5,845 │  5,400 │  2,995 ║ 13,530 │
  221. │ FPATAN   ║ Arcustangens     ║   448 ║  8,895 │  7,965 │  3,750 ║ 13,875 │
  222. │ FYL2X    ║ Logarithmus      ║   492 ║  8,690 │  7,610 │  3,410 ║ 12,885 │
  223. │ F2XM1    ║ Power Function   ║   317 ║  4,385 │  3,975 │  2,140 ║ 11,640 │
  224. └──────────╨──────────────────╨───────╨────────┴────────┴────────╨────────┘
  225.  
  226.  
  227.  
  228. High Level Language Interface
  229. ═════════════════════════════
  230.  
  231. Only the full version contains the High Level Language Interface (HLLI).
  232. The HLLI utilizes the special code for coprocessor instructions, that are
  233. used by several compilers from Microsoft and Borland.
  234.  
  235. Using this HLLI, FRANKE.387 can execute every instruction much faster.
  236. Normally no application is interfered by the HLLI. If there are any
  237. problems you should disable the HLLI. We suggest that you enable
  238. FRANKE.387 with HLLI and a maximum precision of 53 bits. Using this
  239. option, you have high performance and nearly no risc.
  240.  
  241. The following tables shows the use of HLLI. The tested program executes
  242. every instruction 100,000 times using random numbers. It was written in
  243. C and compiled with Microsoft C (Microsoft) and Turbo C (Borland).
  244. The CPU was a 386DX, 25MHz. The execution time is shown in seconds.
  245.  
  246. ╔══════════════════════════════════════════════════════════════════╗
  247. ║ Test program comiled with Microsoft C:                           ║
  248. ╟──────────╥───────╥───────────╥─────────────────╥─────────────────╢
  249. ║    C-    ║       ║ Microsoft ║   FRANKE.387    ║ FRANKE.387+HLLI ║
  250. ║ Function ║ 387DX ║ Emulation ║ 64 Bit │ 53 Bit ║ 64 Bit │ 53 Bit ║
  251. ╠══════════╬═══════╬═══════════╬════════╪════════╬════════╪════════╣
  252. ║ x := y   ║  0.27 ║      0.27 ║   0.27 │   0.27 ║   0.27 │   0.27 ║
  253. ║ x < y    ║  0.71 ║      8.63 ║   9.56 │   9.51 ║   8.35 │   8.35 ║
  254. ╟──────────╫───────╫───────────╫────────┼────────╫────────┼────────╢
  255. ║ x + y    ║  0.66 ║      8.63 ║   9.07 │   9.07 ║   8.30 │   8.24 ║
  256. ║ x * y    ║  0.71 ║     10.49 ║   9.67 │   9.62 ║   8.85 │   8.79 ║
  257. ║ x / y    ║  0.93 ║     12.47 ║   9.73 │   9.73 ║   8.90 │   8.90 ║
  258. ╟──────────╫───────╫───────────╫────────┼────────╫────────┼────────╢
  259. ║ sqrt(x)  ║  2.75 ║     27.58 ║  29.56 │  28.74 ║  26.32 │  25.44 ║
  260. ║ sin(x)   ║  7.14 ║    129.67 ║  92.86 │  90.11 ║  84.62 │  82.42 ║
  261. ║ cos(x)   ║  7.14 ║    131.32 ║  94.51 │  91.21 ║  86.26 │  82.97 ║
  262. ║ tan(x)   ║  6.04 ║    103.30 ║  76.92 │  75.82 ║  70.88 │  69.23 ║
  263. ║ atan(x)  ║  4.95 ║    107.69 ║  52.20 │  52.20 ║  47.25 │  46.70 ║
  264. ║ exp(x)   ║  7.14 ║    130.77 ║  94.00 │  92.31 ║  83.52 │  81.87 ║
  265. ║ log(x)   ║  4.95 ║    103.30 ║  70.33 │  65.38 ║  65.38 │  60.99 ║
  266. ║ pow(x,y) ║  9.89 ║    217.58 ║ 143.41 │ 137.36 ║ 131.32 │ 125.27 ║
  267. ╚══════════╩═══════╩═══════════╩════════╧════════╩════════╧════════╝
  268.  
  269. ╔══════════════════════════════════════════════════════════════════╗
  270. ║ Test program compiled with Borland's Turbo C:                    ║
  271. ╟──────────╥───────╥───────────╥─────────────────╥─────────────────╢
  272. ║    C-    ║       ║ Borland   ║   FRANKE.387    ║ FRANKE.387+HLLI ║
  273. ║ Function ║ 387DX ║ Emulation ║ 64 Bit │ 53 Bit ║ 64 Bit │ 53 Bit ║
  274. ╠══════════╬═══════╬═══════════╬════════╪════════╬════════╪════════╣
  275. ║ x := y   ║  0.57 ║      4.47 ║   5.74 │   5.74 ║   5.13 │   5.13 ║
  276. ║ x < y    ║  0.68 ║      6.89 ║   8.21 │   8.21 ║   7.32 │   7.32 ║
  277. ╟──────────╫───────╫───────────╫────────┼────────╫────────┼────────╢
  278. ║ x + y    ║  0.79 ║      8.59 ║   9.31 │   9.31 ║   8.48 │   8.48 ║
  279. ║ x * y    ║  0.90 ║     10.74 ║   9.91 │   9.80 ║   9.08 │   8.98 ║
  280. ║ x / y    ║  1.01 ║     11.95 ║   9.91 │   9.91 ║   9.14 │   9.09 ║
  281. ╟──────────╫───────╫───────────╫────────┼────────╫────────┼────────╢
  282. ║ sqrt(x)  ║  1.67 ║     19.25 ║  17.05 │  16.18 ║  15.62 │  14.69 ║
  283. ║ sin(x)   ║  3.21 ║     38.92 ║  29.58 │  28.48 ║  28.48 │  27.93 ║
  284. ║ cos(x)   ║  3.76 ║     38.92 ║  30.64 │  29.03 ║  29.03 │  28.48 ║
  285. ║ tan(x)   ║  3.76 ║     68.04 ║  39.47 │  37.82 ║  37.82 │  35.63 ║
  286. ║ atan(x)  ║  4.86 ║     44.97 ║  47.16 │  46.62 ║  26.83 │  26.29 ║
  287. ║ exp(x)   ║  8.70 ║     68.64 ║ 102.66 │ 101.56 ║  36.17 │  34.53 ║
  288. ║ log(x)   ║  4.86 ║     60.90 ║  61.45 │  57.05 ║  51.01 │  46.62 ║
  289. ║ pow(x,y) ║ 15.05 ║    149.67 ║ 190.88 │ 184.84 ║ 107.31 │ 101.32 ║
  290. ╚══════════╩═══════╩═══════════╩════════╧════════╩════════╧════════╝
  291.  
  292.  
  293.  
  294. Benchmark Tests
  295. ═══════════════
  296.  
  297. FRANKE.387 was tested with some popular benchmark programs. The table
  298. shows the results that were reported using a 386DX with 25MHz:
  299.  
  300. ┌───────────┬─────╥───────╥──────╥────────────────────╥────────────────────┐
  301. │           │     ║       ║  no  ║     FRANKE.387     ║  FRANKE.387 + HLLI │
  302. │ Benchmark │     ║ 387DX ║ Copr.║ 64 B.│ 53 B.│ 24 B.║ 64 B.│ 53 B.│ 24 B.│
  303. ├───────────┼─────╫───────╫──────╫──────┼──────┼──────╫──────┼──────┼──────┤
  304. │ ATPERF    │ MHz ║ 52.5  ║ ---- ║ 6.8  │ 6.8  │ 7.5  ║ 6.8  │ 6.8  │ 7.5  │
  305. │ 87TEST    │ MHz ║ 26.91 ║ ---- ║ 1.881│ 1.937│ 2.8  ║ 1.881│ 1.937│ 2.8  │
  306. │ BENCH 5.0 │  s  ║  0.33 ║ ---- ║ 3.66 │ 3.45 │ 2.94 ║ 2.44 │ 2.30 │ 1.78 │
  307. │ TEST41V   │  s  ║  0.50 ║ 2.06 ║ 1.55 │ 1.50 │ 1.22 ║ 1.44 │ 1.39 │ 1.17 │
  308. └───────────┴─────╨───────╨──────╨──────┴──────┴──────╨──────┴──────┴──────┘
  309.  
  310. The benchmark programs used:
  311.  
  312. ATPERF:    ATPERF -- PC Tech Journal AT Hardware Performance Test
  313.            Version 2.00, Copyright (c) 1986, 1987 Ziff Communications Co.
  314.  
  315. 87TEST:    87TEST Version 2.01
  316.            Copyright (C) MicroWay, Inc. 1985-1989
  317.      
  318. BENCH 5.0: PC Magazine Labs Benchmark Series 5.0
  319.  
  320. TEST41V:   SpeedTest Version 4.1, Copyright 1990 by Duane A. Allred
  321.  
  322.  
  323.  
  324. 387 Instruction Trace Mode
  325. ══════════════════════════
  326.  
  327. Der 387 Instruction Trace Mode is available in the full version only. It
  328. allows completely new methods to debug. The 387 Instruction Trace Mode
  329. shows every executed coprocessor instruction at the screen using the
  330. image:
  331.  
  332.   CS:IP   Code Instruc. Operand      Address       Contents
  333.  
  334. e.g.:
  335.  
  336. 2AE1:4FD3 D9EC LDLG2
  337. 2AE1:4FD6 DEC9 MULP     ST(1),ST
  338. 2AE1:4FD9 DF5E ISTP     Word         30ED:03C4     = 0000
  339. 2AE1:4FE6 DB6E LD       TByte        30ED:03BA     = 3FFF8000000000000000
  340.  
  341. Once 387 Instruction Trace Mode is enabled, instructions are only
  342. displayed if scroll lock is on. You can toggle output on or off if
  343. you toggle scroll lock on and off.
  344.  
  345. To single step through coprocessor instructions, hold down the left
  346. shift key and step with the Ctrl key. If the left shift key is pressed,
  347. the 387 Instruction Trace Mode waits for the Ctrl key pressed, before
  348. it resumes the running program.
  349.  
  350. The 387 Instruction Trace Mode gives you additional features to debug
  351. an application that uses a coprocessor. The 387 Instruction Trace Mode
  352. is completely transparent to the application.
  353.  
  354. ┌──────────────────────────────────────────────────────────────────────────┐
  355. │ To use the 387 Instruction Trace Mode you need the program 387TRACE.EXE, │
  356. │ that you will get together with the full version. This program becomes   │
  357. │ resident at the first call, using about 2800 bytes. 387TRACE toggles     │
  358. │ between 387 Instruction Trace Mode enabled and disabled at each call.    │
  359. └──────────────────────────────────────────────────────────────────────────┘
  360.  
  361.  
  362.  
  363. Compatibiliy
  364. ════════════
  365.  
  366. FRANKE.387 is a high quality software product. It has efficient
  367. algorithms that uses the full 32 bit power of 386 processors.
  368.  
  369. FRANKE.387 does exactly the same as a 387 coprocessor. The few minor
  370. differences to the 387 coprocessor are described here:
  371.  
  372. 1. Precision
  373. ────────────
  374. The 387 coprocessor has always an internal precision of 67 bits. For
  375. less precision only the results are rounded. Instead of that,
  376. FRANKE.387 calculates with a maximum precision of 64 bits. At 64 bit
  377. precision some rounding errors may occur. This rounding errors normally
  378. have no effects. With the 24 and 53 bit precision FRANKE.387 gives always
  379. better results.
  380.  
  381. 2. Rounding
  382. ───────────
  383. The only rounding by FRANKE.387 is done with the instruction FRNDINT or
  384. before storing a number from coprocessor stack. The 387 coprocessor
  385. rounds after each calculation. This different rounding makes FRANKE.387
  386. faster. No side effects by this rounding method were detected.
  387.  
  388. 3. F2XM1, FYL2XP1
  389. ─────────────────
  390. The 387 coprocessor restricts the arguments for the F2XM1 and FYL2XP1
  391. instruction only. FRANKE.387 does not have this restrictions. Every
  392. instruction may be called with any mathematically allowed argument.
  393.  
  394. 4. F2X
  395. ──────
  396. FRANKE.387 has the additional instruction F2X (code D9 EF). This
  397. instruction does the same as F2XM1, FLD1, FADDP but without any loss of
  398. precision.
  399.  
  400. 5. FPTAN
  401. ─────────
  402. FRANKE.387 calculates for tan(π/2) the result "infinity", which is the
  403. precise result.
  404.  
  405. 6. Exceptions
  406. ─────────────
  407. FRANKE.387 is a software emulation. It cannot cause any hardware
  408. interrupt. If any exception occurs, FRANKE.387 will directly execute an
  409. INT 2 instruction. This Interrupt cannot be masked. This is exactly like
  410. the specification of the 387 coprozessor. INT 2 is called for compati-
  411. bility.
  412.  
  413.  
  414.